package com.myblog.mapper;

import com.myblog.pojo.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.awt.*;

@Repository
public interface Pagemapper {

    @Select("SELECT * FROM page WHERE page.article_id=#{articleid}")
    @Results(
            value = {
                    @Result(property = "id",column = "id"),
                    @Result(property = "articleId",column = "article_id"),
                    @Result(property = "articlePath",column = "article_path"),
                    @Result(property = "describe",column = "describe")
            }
    )
    public Page findpagepath(@Param("articleid") int articleid);
}
